<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>lacewing.bytereader</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lacewing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://mp2.dk">Python Lacewing Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="lacewing-module.html">Package&nbsp;lacewing</a> ::
        Module&nbsp;bytereader
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="lacewing.bytereader-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="lacewing.bytereader-module.html">Module lacewing.bytereader</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment"># Copyright (c) 2011 Mathias Kaerlev.</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"># See LICENSE for details.</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-docstring">Implements a way to easily read and write binary types</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">cStringIO</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable lacewing.bytereader.BYTE=lacewing.bytereader-module.html#BYTE"><a title="lacewing.bytereader.BYTE" class="py-name" href="#" onclick="return doclink('link-0', 'BYTE', 'link-0');">BYTE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">Struct</tt><tt class="py-op">(</tt><tt class="py-string">'b'</tt><tt class="py-op">)</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable lacewing.bytereader.UBYTE=lacewing.bytereader-module.html#UBYTE"><a title="lacewing.bytereader.UBYTE" class="py-name" href="#" onclick="return doclink('link-1', 'UBYTE', 'link-1');">UBYTE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">Struct</tt><tt class="py-op">(</tt><tt class="py-string">'B'</tt><tt class="py-op">)</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable lacewing.bytereader.SHORT=lacewing.bytereader-module.html#SHORT"><a title="lacewing.bytereader.SHORT" class="py-name" href="#" onclick="return doclink('link-2', 'SHORT', 'link-2');">SHORT</a></tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">Struct</tt><tt class="py-op">(</tt><tt class="py-string">'h'</tt><tt class="py-op">)</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable lacewing.bytereader.USHORT=lacewing.bytereader-module.html#USHORT"><a title="lacewing.bytereader.USHORT" class="py-name" href="#" onclick="return doclink('link-3', 'USHORT', 'link-3');">USHORT</a></tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">Struct</tt><tt class="py-op">(</tt><tt class="py-string">'H'</tt><tt class="py-op">)</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable lacewing.bytereader.FLOAT=lacewing.bytereader-module.html#FLOAT"><a title="lacewing.bytereader.FLOAT" class="py-name" href="#" onclick="return doclink('link-4', 'FLOAT', 'link-4');">FLOAT</a></tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">Struct</tt><tt class="py-op">(</tt><tt class="py-string">'f'</tt><tt class="py-op">)</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable lacewing.bytereader.INT=lacewing.bytereader-module.html#INT"><a title="lacewing.bytereader.INT" class="py-name" href="#" onclick="return doclink('link-5', 'INT', 'link-5');">INT</a></tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">Struct</tt><tt class="py-op">(</tt><tt class="py-string">'i'</tt><tt class="py-op">)</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable lacewing.bytereader.UINT=lacewing.bytereader-module.html#UINT"><a title="lacewing.bytereader.UINT" class="py-name" href="#" onclick="return doclink('link-6', 'UINT', 'link-6');">UINT</a></tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">Struct</tt><tt class="py-op">(</tt><tt class="py-string">'I'</tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"> </tt>
<a name="ByteReader"></a><div id="ByteReader-def"><a name="L19"></a><tt class="py-lineno"> 19</tt> <a class="py-toggle" href="#" id="ByteReader-toggle" onclick="return toggle('ByteReader');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html">ByteReader</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ByteReader-expanded"><a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">    <tt id="link-7" class="py-name" targets="Variable lacewing.bytereader.ByteReader.buffer=lacewing.bytereader.ByteReader-class.html#buffer"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-7', 'buffer', 'link-7');">buffer</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="ByteReader.__init__"></a><div id="ByteReader.__init__-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="ByteReader.__init__-toggle" onclick="return toggle('ByteReader.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">input</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.__init__-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-docstring">        @param input: The input to initially fill the reader with</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-docstring">        @type input: file/str/buffer</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">input</tt><tt class="py-op">,</tt> <tt class="py-name">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">            <tt id="link-8" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-8', 'buffer', 'link-7');">buffer</a></tt> <tt class="py-op">=</tt> <tt class="py-name">input</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">write</tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-9', 'buffer', 'link-7');">buffer</a></tt><tt class="py-op">.</tt><tt class="py-name">write</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">input</tt> <tt class="py-keyword">is</tt> <tt class="py-keyword">not</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">                <tt id="link-10" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-10', 'buffer', 'link-7');">buffer</a></tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-name">input</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">                <tt id="link-11" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-11', 'buffer', 'link-7');">buffer</a></tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">write</tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-12', 'buffer', 'link-7');">buffer</a></tt><tt class="py-op">.</tt><tt class="py-name">write</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method lacewing.bytereader.ByteReader.data()=lacewing.bytereader.ByteReader-class.html#data"><a title="lacewing.bytereader.ByteReader.data" class="py-name" href="#" onclick="return doclink('link-13', 'data', 'link-13');">data</a></tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-14', 'buffer', 'link-7');">buffer</a></tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line"> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-15', 'buffer', 'link-7');">buffer</a></tt> <tt class="py-op">=</tt> <tt id="link-16" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-16', 'buffer', 'link-7');">buffer</a></tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tell</tt> <tt class="py-op">=</tt> <tt id="link-17" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-17', 'buffer', 'link-7');">buffer</a></tt><tt class="py-op">.</tt><tt class="py-name">tell</tt> </tt>
</div><a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.data"></a><div id="ByteReader.data-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="ByteReader.data-toggle" onclick="return toggle('ByteReader.data');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#data">data</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.data-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.data-expanded"><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-name">currentPosition</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tell</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method lacewing.bytereader.ByteReader.seek()=lacewing.bytereader.ByteReader-class.html#seek"><a title="lacewing.bytereader.ByteReader.seek" class="py-name" href="#" onclick="return doclink('link-18', 'seek', 'link-18');">seek</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">        <tt id="link-19" class="py-name"><a title="lacewing.bytereader.ByteReader.data" class="py-name" href="#" onclick="return doclink('link-19', 'data', 'link-13');">data</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method lacewing.bytereader.ByteReader.read()=lacewing.bytereader.ByteReader-class.html#read,Method lacewing.packetloaders.client.ChannelMaster.read()=lacewing.packetloaders.client.ChannelMaster-class.html#read,Method lacewing.packetloaders.client.Request.read()=lacewing.packetloaders.client.Request-class.html#read,Method lacewing.packetloaders.server.ChannelPeer.read()=lacewing.packetloaders.server.ChannelPeer-class.html#read,Method lacewing.packetloaders.server.Peer.read()=lacewing.packetloaders.server.Peer-class.html#read,Method lacewing.packetloaders.server.Response.read()=lacewing.packetloaders.server.Response-class.html#read"><a title="lacewing.bytereader.ByteReader.read
lacewing.packetloaders.client.ChannelMaster.read
lacewing.packetloaders.client.Request.read
lacewing.packetloaders.server.ChannelPeer.read
lacewing.packetloaders.server.Peer.read
lacewing.packetloaders.server.Response.read" class="py-name" href="#" onclick="return doclink('link-20', 'read', 'link-20');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="lacewing.bytereader.ByteReader.seek" class="py-name" href="#" onclick="return doclink('link-21', 'seek', 'link-18');">seek</a></tt><tt class="py-op">(</tt><tt class="py-name">currentPosition</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-22" class="py-name"><a title="lacewing.bytereader.ByteReader.data" class="py-name" href="#" onclick="return doclink('link-22', 'data', 'link-13');">data</a></tt> </tt>
</div><a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.seek"></a><div id="ByteReader.seek-def"><a name="L48"></a><tt class="py-lineno"> 48</tt> <a class="py-toggle" href="#" id="ByteReader.seek-toggle" onclick="return toggle('ByteReader.seek');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#seek">seek</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">arg</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kw</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.seek-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.seek-expanded"><a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-23', 'buffer', 'link-7');">buffer</a></tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="lacewing.bytereader.ByteReader.seek" class="py-name" href="#" onclick="return doclink('link-24', 'seek', 'link-18');">seek</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">arg</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kw</tt><tt class="py-op">)</tt> </tt>
</div><a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.read"></a><div id="ByteReader.read-def"><a name="L51"></a><tt class="py-lineno"> 51</tt> <a class="py-toggle" href="#" id="ByteReader.read-toggle" onclick="return toggle('ByteReader.read');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">arg</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kw</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.read-expanded"><a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="lacewing.bytereader.ByteReader.buffer" class="py-name" href="#" onclick="return doclink('link-25', 'buffer', 'link-7');">buffer</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="lacewing.bytereader.ByteReader.read
lacewing.packetloaders.client.ChannelMaster.read
lacewing.packetloaders.client.Request.read
lacewing.packetloaders.server.ChannelPeer.read
lacewing.packetloaders.server.Peer.read
lacewing.packetloaders.server.Response.read" class="py-name" href="#" onclick="return doclink('link-26', 'read', 'link-20');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt class="py-name">arg</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kw</tt><tt class="py-op">)</tt> </tt>
</div><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.size"></a><div id="ByteReader.size-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="ByteReader.size-toggle" onclick="return toggle('ByteReader.size');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#size">size</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.size-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.size-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-name">currentPosition</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tell</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name"><a title="lacewing.bytereader.ByteReader.seek" class="py-name" href="#" onclick="return doclink('link-27', 'seek', 'link-18');">seek</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt id="link-28" class="py-name" targets="Method lacewing.bytereader.ByteReader.size()=lacewing.bytereader.ByteReader-class.html#size"><a title="lacewing.bytereader.ByteReader.size" class="py-name" href="#" onclick="return doclink('link-28', 'size', 'link-28');">size</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tell</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="lacewing.bytereader.ByteReader.seek" class="py-name" href="#" onclick="return doclink('link-29', 'seek', 'link-18');">seek</a></tt><tt class="py-op">(</tt><tt class="py-name">currentPosition</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-30" class="py-name"><a title="lacewing.bytereader.ByteReader.size" class="py-name" href="#" onclick="return doclink('link-30', 'size', 'link-28');">size</a></tt> </tt>
</div><a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.__len__"></a><div id="ByteReader.__len__-def"><a name="L61"></a><tt class="py-lineno"> 61</tt> <a class="py-toggle" href="#" id="ByteReader.__len__-toggle" onclick="return toggle('ByteReader.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.__len__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.__len__-expanded"><a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="lacewing.bytereader.ByteReader.size" class="py-name" href="#" onclick="return doclink('link-31', 'size', 'link-28');">size</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.__str__"></a><div id="ByteReader.__str__-def"><a name="L64"></a><tt class="py-lineno"> 64</tt> <a class="py-toggle" href="#" id="ByteReader.__str__-toggle" onclick="return toggle('ByteReader.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.__str__-expanded"><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="lacewing.bytereader.ByteReader.data" class="py-name" href="#" onclick="return doclink('link-32', 'data', 'link-13');">data</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.__repr__"></a><div id="ByteReader.__repr__-def"><a name="L67"></a><tt class="py-lineno"> 67</tt> <a class="py-toggle" href="#" id="ByteReader.__repr__-toggle" onclick="return toggle('ByteReader.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.__repr__-expanded"><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"> </tt>
<a name="ByteReader.readByte"></a><div id="ByteReader.readByte-def"><a name="L70"></a><tt class="py-lineno"> 70</tt> <a class="py-toggle" href="#" id="ByteReader.readByte-toggle" onclick="return toggle('ByteReader.readByte');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#readByte">readByte</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">unsigned</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.readByte-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.readByte-expanded"><a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt id="link-33" class="py-name"><a title="lacewing.bytereader.UBYTE" class="py-name" href="#" onclick="return doclink('link-33', 'UBYTE', 'link-1');">UBYTE</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">unsigned</tt> <tt class="py-keyword">else</tt> <tt id="link-34" class="py-name"><a title="lacewing.bytereader.BYTE" class="py-name" href="#" onclick="return doclink('link-34', 'BYTE', 'link-0');">BYTE</a></tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">        <tt id="link-35" class="py-name" targets="Variable lacewing.moo.packetloaders.message.Message.value=lacewing.moo.packetloaders.message.Message-class.html#value,Variable lacewing.multidict.DictItem.value=lacewing.multidict.DictItem-class.html#value,Variable lacewing.packetloaders.server.Response.value=lacewing.packetloaders.server.Response-class.html#value"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-35', 'value', 'link-35');">value</a></tt><tt class="py-op">,</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Method lacewing.bytereader.ByteReader.readStruct()=lacewing.bytereader.ByteReader-class.html#readStruct"><a title="lacewing.bytereader.ByteReader.readStruct" class="py-name" href="#" onclick="return doclink('link-36', 'readStruct', 'link-36');">readStruct</a></tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-37" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-37', 'value', 'link-35');">value</a></tt> </tt>
</div><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">         </tt>
<a name="ByteReader.readShort"></a><div id="ByteReader.readShort-def"><a name="L75"></a><tt class="py-lineno"> 75</tt> <a class="py-toggle" href="#" id="ByteReader.readShort-toggle" onclick="return toggle('ByteReader.readShort');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#readShort">readShort</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">unsigned</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.readShort-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.readShort-expanded"><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt id="link-38" class="py-name"><a title="lacewing.bytereader.USHORT" class="py-name" href="#" onclick="return doclink('link-38', 'USHORT', 'link-3');">USHORT</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">unsigned</tt> <tt class="py-keyword">else</tt> <tt id="link-39" class="py-name"><a title="lacewing.bytereader.SHORT" class="py-name" href="#" onclick="return doclink('link-39', 'SHORT', 'link-2');">SHORT</a></tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt id="link-40" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-40', 'value', 'link-35');">value</a></tt><tt class="py-op">,</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name"><a title="lacewing.bytereader.ByteReader.readStruct" class="py-name" href="#" onclick="return doclink('link-41', 'readStruct', 'link-36');">readStruct</a></tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-42" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-42', 'value', 'link-35');">value</a></tt> </tt>
</div><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
<a name="ByteReader.readFloat"></a><div id="ByteReader.readFloat-def"><a name="L80"></a><tt class="py-lineno"> 80</tt> <a class="py-toggle" href="#" id="ByteReader.readFloat-toggle" onclick="return toggle('ByteReader.readFloat');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#readFloat">readFloat</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.readFloat-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.readFloat-expanded"><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt id="link-43" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-43', 'value', 'link-35');">value</a></tt><tt class="py-op">,</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="lacewing.bytereader.ByteReader.readStruct" class="py-name" href="#" onclick="return doclink('link-44', 'readStruct', 'link-36');">readStruct</a></tt><tt class="py-op">(</tt><tt id="link-45" class="py-name"><a title="lacewing.bytereader.FLOAT" class="py-name" href="#" onclick="return doclink('link-45', 'FLOAT', 'link-4');">FLOAT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-46" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-46', 'value', 'link-35');">value</a></tt> </tt>
</div><a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">         </tt>
<a name="ByteReader.readInt"></a><div id="ByteReader.readInt-def"><a name="L84"></a><tt class="py-lineno"> 84</tt> <a class="py-toggle" href="#" id="ByteReader.readInt-toggle" onclick="return toggle('ByteReader.readInt');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#readInt">readInt</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">unsigned</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.readInt-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.readInt-expanded"><a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt id="link-47" class="py-name"><a title="lacewing.bytereader.UINT" class="py-name" href="#" onclick="return doclink('link-47', 'UINT', 'link-6');">UINT</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">unsigned</tt> <tt class="py-keyword">else</tt> <tt id="link-48" class="py-name"><a title="lacewing.bytereader.INT" class="py-name" href="#" onclick="return doclink('link-48', 'INT', 'link-5');">INT</a></tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt id="link-49" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-49', 'value', 'link-35');">value</a></tt><tt class="py-op">,</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="lacewing.bytereader.ByteReader.readStruct" class="py-name" href="#" onclick="return doclink('link-50', 'readStruct', 'link-36');">readStruct</a></tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-51" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-51', 'value', 'link-35');">value</a></tt> </tt>
</div><a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">         </tt>
<a name="ByteReader.readString"></a><div id="ByteReader.readString-def"><a name="L89"></a><tt class="py-lineno"> 89</tt> <a class="py-toggle" href="#" id="ByteReader.readString-toggle" onclick="return toggle('ByteReader.readString');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#readString">readString</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.readString-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.readString-expanded"><a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-name">currentPosition</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">tell</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">store</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-name">readChar</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="lacewing.bytereader.ByteReader.read
lacewing.packetloaders.client.ChannelMaster.read
lacewing.packetloaders.client.Request.read
lacewing.packetloaders.server.ChannelPeer.read
lacewing.packetloaders.server.Peer.read
lacewing.packetloaders.server.Response.read" class="py-name" href="#" onclick="return doclink('link-52', 'read', 'link-20');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">readChar</tt> <tt class="py-keyword">in</tt> <tt class="py-op">(</tt><tt class="py-string">'\x00'</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">            <tt class="py-name">store</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">store</tt><tt class="py-op">,</tt> <tt class="py-name">readChar</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">store</tt> </tt>
</div><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.readStruct"></a><div id="ByteReader.readStruct-def"><a name="L99"></a><tt class="py-lineno"> 99</tt> <a class="py-toggle" href="#" id="ByteReader.readStruct-toggle" onclick="return toggle('ByteReader.readStruct');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#readStruct">readStruct</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">structType</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.readStruct-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.readStruct-expanded"><a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">structType</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="lacewing.bytereader.ByteReader.read
lacewing.packetloaders.client.ChannelMaster.read
lacewing.packetloaders.client.Request.read
lacewing.packetloaders.server.ChannelPeer.read
lacewing.packetloaders.server.Peer.read
lacewing.packetloaders.server.Response.read" class="py-name" href="#" onclick="return doclink('link-53', 'read', 'link-20');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">structType</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="lacewing.bytereader.ByteReader.size" class="py-name" href="#" onclick="return doclink('link-54', 'size', 'link-28');">size</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">         </tt>
<a name="ByteReader.writeByte"></a><div id="ByteReader.writeByte-def"><a name="L102"></a><tt class="py-lineno">102</tt> <a class="py-toggle" href="#" id="ByteReader.writeByte-toggle" onclick="return toggle('ByteReader.writeByte');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#writeByte">writeByte</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">unsigned</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.writeByte-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.writeByte-expanded"><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt id="link-55" class="py-name"><a title="lacewing.bytereader.UBYTE" class="py-name" href="#" onclick="return doclink('link-55', 'UBYTE', 'link-1');">UBYTE</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">unsigned</tt> <tt class="py-keyword">else</tt> <tt id="link-56" class="py-name"><a title="lacewing.bytereader.BYTE" class="py-name" href="#" onclick="return doclink('link-56', 'BYTE', 'link-0');">BYTE</a></tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name" targets="Method lacewing.bytereader.ByteReader.writeStruct()=lacewing.bytereader.ByteReader-class.html#writeStruct"><a title="lacewing.bytereader.ByteReader.writeStruct" class="py-name" href="#" onclick="return doclink('link-57', 'writeStruct', 'link-57');">writeStruct</a></tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt id="link-58" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-58', 'value', 'link-35');">value</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">         </tt>
<a name="ByteReader.writeShort"></a><div id="ByteReader.writeShort-def"><a name="L106"></a><tt class="py-lineno">106</tt> <a class="py-toggle" href="#" id="ByteReader.writeShort-toggle" onclick="return toggle('ByteReader.writeShort');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#writeShort">writeShort</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">unsigned</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.writeShort-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.writeShort-expanded"><a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt id="link-59" class="py-name"><a title="lacewing.bytereader.USHORT" class="py-name" href="#" onclick="return doclink('link-59', 'USHORT', 'link-3');">USHORT</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">unsigned</tt> <tt class="py-keyword">else</tt> <tt id="link-60" class="py-name"><a title="lacewing.bytereader.SHORT" class="py-name" href="#" onclick="return doclink('link-60', 'SHORT', 'link-2');">SHORT</a></tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="lacewing.bytereader.ByteReader.writeStruct" class="py-name" href="#" onclick="return doclink('link-61', 'writeStruct', 'link-57');">writeStruct</a></tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt id="link-62" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-62', 'value', 'link-35');">value</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"> </tt>
<a name="ByteReader.writeFloat"></a><div id="ByteReader.writeFloat-def"><a name="L110"></a><tt class="py-lineno">110</tt> <a class="py-toggle" href="#" id="ByteReader.writeFloat-toggle" onclick="return toggle('ByteReader.writeFloat');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#writeFloat">writeFloat</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.writeFloat-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.writeFloat-expanded"><a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="lacewing.bytereader.ByteReader.writeStruct" class="py-name" href="#" onclick="return doclink('link-63', 'writeStruct', 'link-57');">writeStruct</a></tt><tt class="py-op">(</tt><tt id="link-64" class="py-name"><a title="lacewing.bytereader.FLOAT" class="py-name" href="#" onclick="return doclink('link-64', 'FLOAT', 'link-4');">FLOAT</a></tt><tt class="py-op">,</tt> <tt id="link-65" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-65', 'value', 'link-35');">value</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">         </tt>
<a name="ByteReader.writeInt"></a><div id="ByteReader.writeInt-def"><a name="L113"></a><tt class="py-lineno">113</tt> <a class="py-toggle" href="#" id="ByteReader.writeInt-toggle" onclick="return toggle('ByteReader.writeInt');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#writeInt">writeInt</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">,</tt> <tt class="py-param">unsigned</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.writeInt-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.writeInt-expanded"><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-name">format</tt> <tt class="py-op">=</tt> <tt id="link-66" class="py-name"><a title="lacewing.bytereader.UINT" class="py-name" href="#" onclick="return doclink('link-66', 'UINT', 'link-6');">UINT</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">unsigned</tt> <tt class="py-keyword">else</tt> <tt id="link-67" class="py-name"><a title="lacewing.bytereader.INT" class="py-name" href="#" onclick="return doclink('link-67', 'INT', 'link-5');">INT</a></tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="lacewing.bytereader.ByteReader.writeStruct" class="py-name" href="#" onclick="return doclink('link-68', 'writeStruct', 'link-57');">writeStruct</a></tt><tt class="py-op">(</tt><tt class="py-name">format</tt><tt class="py-op">,</tt> <tt id="link-69" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-69', 'value', 'link-35');">value</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">         </tt>
<a name="ByteReader.writeString"></a><div id="ByteReader.writeString-def"><a name="L117"></a><tt class="py-lineno">117</tt> <a class="py-toggle" href="#" id="ByteReader.writeString-toggle" onclick="return toggle('ByteReader.writeString');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#writeString">writeString</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.writeString-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.writeString-expanded"><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt id="link-70" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-70', 'value', 'link-35');">value</a></tt> <tt class="py-op">+</tt> <tt class="py-string">"\x00"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">     </tt>
<a name="ByteReader.writeStruct"></a><div id="ByteReader.writeStruct-def"><a name="L120"></a><tt class="py-lineno">120</tt> <a class="py-toggle" href="#" id="ByteReader.writeStruct-toggle" onclick="return toggle('ByteReader.writeStruct');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.bytereader.ByteReader-class.html#writeStruct">writeStruct</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">structType</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">values</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ByteReader.writeStruct-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ByteReader.writeStruct-expanded"><a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">write</tt><tt class="py-op">(</tt><tt class="py-name">structType</tt><tt class="py-op">.</tt><tt class="py-name">pack</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-71" class="py-name" targets="Method lacewing.multidict.MultikeyDict.values()=lacewing.multidict.MultikeyDict-class.html#values"><a title="lacewing.multidict.MultikeyDict.values" class="py-name" href="#" onclick="return doclink('link-71', 'values', 'link-71');">values</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lacewing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://mp2.dk">Python Lacewing Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Dec 22 06:20:00 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
